//////////////////////////////////////////////////////////////////////
//!\file AlbumDataModel.hpp
//!\brief Holds track and album data.
//!\author timmsusa@googlemail.com
//////////////////////////////////////////////////////////////////////

#ifndef COLLECTIONDATAMODEL_HPP
#define COLLECTIONDATAMODEL_HPP

#include <QObject>
#include <QDir>
#include <QFileInfo>
#include <QString>
#include <QVector>
#include <QStringList>
#include <QSet>
#include "Album.hpp"
#include "FlacTrack.hpp"
#include "FlacMetaDataManager.hpp"
#include "Persistence.hpp"

class AlbumDataModel: public QObject, public FlacMetadataManager
{
    Q_OBJECT

public:
    AlbumDataModel(const QString& path);
    const QVector < Album >& getAlbumList()const;
    void clearFlacAlbumList();
    void addAlbum(const Album& album);
    void addFlacTrackToAlbum(const QFileInfo fi, Album& album);
    const AlbumDataModel& get()const;

public slots:
    void slotDeepScanEnabled(bool enabled);

private:
    Persistence m_Persistence;
    bool m_DeepScanEnabled;
    QString m_Path;
    QVector < Album > m_FlacAlbumList;
};

#endif // COLLECTIONDATAMODEL_HPP
